//时间方法
export const dataOne =(moment)=>{
    let date = new Date(moment);
    let year = date.getFullYear();
    let month = date.getMonth() + 1;
    let day = date.getDate();
    if(day < 10){
        day = '0' + day;
    }
    if(month < 10){
        month = '0' + month;
    }
    let dates = year + '-' + month + '-' + day;
    return(dates);
}

//获取图片路径
export const getObjectURL = (file) => {
    let url = null;
    if (window.createObjectURL !== undefined) {
        url = window.createObjectURL(file);
    } else if (window.URL !== undefined) {
        // Mozilla(Firefox)
        url = window.URL.createObjectURL(file);
    } else if (window.webkitURL !== undefined) {
        // WebKit 或 Chrome
        url = window.webkitURL.createObjectURL(file);
    }
    return url;
}
